Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms

Public Class FrmCrTS_Phanbo
    Private thang, nam As String
    Private customerReport As ReportDocument

    Private Sub FrmCrCanDoiTaiKhoan_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        frmLoading.Show()
        Dim sqlQuery As String = "SELECT  * FROM TS_phanbo where recycleID='" & nam & thang & "' "
        Dim reportPath = Application.StartupPath & "\" & "crTS_Phanbo.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("TThang", thang)
        customerReport.SetParameterValue("TNam", nam)
        customerReport.SetParameterValue("company", globalVariale.COMPANY)
        customerReport.SetParameterValue("address", globalVariale.ADDRESS)
        Me.CrNXTTongHopview.ReportSource = customerReport
        frmLoading.Close()
        frmLoading.Dispose()
    End Sub
    Public Sub setThang(ByVal s As String)
        thang = s
    End Sub
    Public Sub setNam(ByVal s As String)
        nam = s
    End Sub

End Class
